/*
 * @Description: 
 * @Author: changqing
 * @Date: 2021-08-29 22:17:58
 * @LastEditTime: 2021-08-29 22:17:59
 * @LastEditors: changqing
 * @Usage: 
 */
var { combineLatest,of,timer, interval } = require('rxjs');
var { map} = require('rxjs/operators');

const sourceA = interval(1000).pipe(map((data) => `A${++data}`));
const sourceB = interval(2000).pipe(map((data) => `B${++data}`));
const sourceC = interval(3000).pipe(map((data) => `C${++data}`));

combineLatest([sourceA, sourceB, sourceC]).subscribe((data) =>
console.log(`combineLatest 示例: ${data}`)
);
 /*
 combineLatest 示例: A3,B1,C1
 combineLatest 示例: A4,B1,C1
 combineLatest 示例: A4,B2,C1
 combineLatest 示例: A5,B2,C1
 combineLatest 示例: A6,B2,C1
 combineLatest 示例: A6,B3,C1
 combineLatest 示例: A6,B3,C2
 */